<?php
/**
 * Created by PhpStorm.
 * User: xiangfeng
 * Date: 2020/6/27
 * Time: 7:48 PM
 */
namespace app\api\http\exceptions;

use think\Exception;
use Throwable;

/**
 * Class ApiExceptions
 * @package app\Exceptions
 */
class ApiExceptions extends Exception
{
    /**
     * ApiExceptions constructor.
     * @param array $apiErrConst
     * @param Throwable|null $previous
     */
    public function __construct(array $apiErrConst, Throwable $previous = null)
    {
        $message = $apiErrConst[1];
        $code = $apiErrConst[0];
        parent::__construct($message, $code, $previous);
    }

}